import txios from '../../index'
import type { IDataType } from '../../types'
import { homeApi } from './type'
// import type { userID } from './type'

export function getLikeSong(ID: number, type?: number) {
  return txios.post<any>({
    url: homeApi.playHistory,
    data: {
      uid: ID,
      type: type ?? 0
    }
  })
}

export function getUserFollows(ID: number) {
  return txios.post<any>({
    url: homeApi.userFollows,
    data: {
      uid: ID
    }
  })
}

export function getUserFolloweds(ID: number) {
  return txios.post<any>({
    url: homeApi.userFolloweds,
    data: {
      uid: ID
    }
  })
}

export function getUserEvent(ID: number) {
  return txios.post<any>({
    url: homeApi.userEvevt,
    data: {
      uid: ID
    }
  })
}

export function delUserEvent(evId: number) {
  return txios.post<any>({
    url: homeApi.delEvevt,
    data: {
      evId: evId
    }
  })
}

export function getUerInfo(evId: number) {
  return txios.post<any>({
    url: homeApi.userInfo,
    data: {
      evId: evId
    }
  })
}
